/* 基础样式 */
.order {
  /* 根容器样式 */
}

.orderContainer {
  padding: 24px;
  max-height: calc(100vh - 171px);
  overflow-y: auto;
  background-color: #FCFBF8;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23704214' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* 颜色变量 */
:root {
  --primary: #704214;
  --secondary: #556B2F;
  --accent: #D2B48C;
  --light: #FCFBF8;
  --dark: #2D231A;
  --success: #22c55e;
  --warning: #eab308;
  --danger: #ef4444;
  --blue: #3b82f6;
  --gray: #9ca3af;
  --light-gray: #f3f4f6;
}

/* 页面标题样式 */
.pageHeader {
  background: linear-gradient(135deg, rgba(112, 66, 20, 0.05) 0%, rgba(85, 107, 47, 0.05) 100%);
  border: 1px solid rgba(112, 66, 20, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.headerContent {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 768px) {
  .headerContent {
    flex-direction: row;
    align-items: center;
  }
}

.pageTitle {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

.pageDescription {
  color: #6b7280;
  margin: 0.5rem 0 0 0;
  display: flex;
  align-items: center;
  font-size: 1rem;
}

/* 搜索区域样式 */
.filterContainer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .filterContainer {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.searchGroup {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
  align-items: center;
}

@media (min-width: 768px) {
  .searchGroup {
    width: auto;
  }
}

.searchInput {
  position: relative;
  flex-grow: 1;
  min-width: 280px;
}

.formInput {
  background-color: var(--light);
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem 1rem 3rem;
  font-size: 1rem;
  width: 100%;
}

.formInput:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(85, 107, 47, 0.3);
}

.searchIcon {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  color: #9ca3af;
  font-size: 1.25rem;
}

/* 订单列表样式 */
.orderListSection {
  background-color: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(112, 66, 20, 0.1);
  margin-bottom: 2rem;
}

.listHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.listCount {
  font-size: 0.95rem;
  color: #6b7280;
}

.tableContainer {
  overflow-x: hidden;
}

.orderTable {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.orderTable th,
.orderTable td {
  padding: 1.5rem;
  text-align: left;
  vertical-align: middle;
  font-size: 1.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.orderTable th {
  font-size: 1rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  background-color: var(--light);
  position: sticky;
  top: 0;
  z-index: 10;
}

.tableRow:hover {
  background-color: rgba(252, 251, 248, 0.5);
  transform: scale(1.005);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.customerName {
  font-weight: 500;
  font-size: 1.1rem;
  margin: 0;
  display: flex;
  align-items: center;
}

/* 用户图标样式 */
.userIcon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(112, 66, 20, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  font-size: 1.2rem;
}

.customerPhone {
  font-size: 1.1rem;
  color: #6b7280;
  margin: 0;
}

.serviceName {
  font-size: 1.1rem;
  margin: 0;
}

.orderAmount {
  font-weight: 600;
  color: var(--primary);
  font-size: 1.1rem;
}

.paymentMethod {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
}

.paymentMethod i {
  font-size: 1.3rem;
}

/* 状态徽章样式 */
.statusBadge {
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  display: inline-block;
  min-width: 90px;
  text-align: center;
}

.statusPending {
  background-color: rgba(234, 179, 8, 0.1);
  color: #854d0e;
}

.statusCancelled {
  background-color: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
}

/* 分页样式 */
.pagination {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  gap: 1rem;
}

@media (min-width: 640px) {
  .pagination {
    flex-direction: row;
  }
}

.paginationInfo {
  font-size: 0.95rem;
  color: #6b7280;
}

/* 弹窗样式优化 - 确保居中且无滚动条 */
.ant-modal {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 100vh !important;
  padding: 1rem !important;
  top: 0 !important;
}

.ant-modal-content {
  border-radius: 1rem !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1) !important;
  width: 100% !important;
  max-width: 600px !important;
  border: none !important;
  animation: modalFadeIn 0.3s ease-out !important;
  max-height: 90vh !important; /* 确保弹窗不会超出屏幕 */
  display: flex !important;
  flex-direction: column !important;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ant-modal-title {
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  color: var(--primary) !important;
  padding: 1.5rem 24px !important;
  border-bottom: 1px solid #f3f4f6 !important;
  margin-bottom: 0 !important;
  display: flex !important;
  align-items: center !important;
}

.ant-modal-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 24px;
  background-color: var(--primary);
  border-radius: 2px;
  margin-right: 12px;
}

.ant-modal-close {
  width: 48px !important;
  height: 48px !important;
  font-size: 1.5rem !important;
  color: #9ca3af !important;
  transition: all 0.2s ease !important;
}

.ant-modal-close:hover {
  color: var(--primary) !important;
  background-color: rgba(112, 66, 20, 0.05) !important;
}

.ant-modal-body {
  padding: 0 !important;
  overflow: hidden !important; /* 禁止滚动条 */
  flex-grow: 1 !important;
}

.ant-modal-footer {
  padding: 1.5rem 24px !important;
  border-top: 1px solid #f3f4f6 !important;
  margin-top: 0 !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 1rem !important;
}

/* 详情内容样式 - 重新排版，确保无滚动条 */
.detailContent {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 24px;
}

/* 订单头部信息区 */
.detailHeader {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f3f4f6;
}

.orderIdSection, .customerInfoSection {
  flex: 1;
  min-width: 220px;
}

/* 时间信息区 */
.detailTimeSection {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f3f4f6;
}

.timeItem {
  flex: 1;
  min-width: 220px;
}

/* 服务与支付信息区 - 紧凑网格布局 */
.detailServicePaymentSection {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f3f4f6;
}

/* 备注信息区 */
.detailRemarksSection {
  margin-top: 0.5rem;
}

/* 详情项通用样式 - 更紧凑的排版 */
.detailLabel {
  font-size: 0.9rem !important;
  color: #6b7280 !important;
  margin: 0 0 0.25rem 0 !important;
  display: flex !important;
  align-items: center !important;
}

.detailLabel::before {
  content: '•';
  font-size: 0.8rem;
  color: var(--accent);
  margin-right: 6px;
}

.detailValue {
  font-size: 1rem !important;
  font-weight: 500 !important;
  margin: 0 !important;
  line-height: 1.4 !important;
}

/* 备注信息样式 - 自适应高度 */
.remarksBox {
  background-color: #FCFBF8;
  border-radius: 0.5rem;
  padding: 1rem;
  border: 1px solid rgba(112, 66, 20, 0.08);
  line-height: 1.5;
  word-break: break-word;
}

.emptyRemarks {
  color: #9ca3af;
  font-style: italic;
}

/* 按钮样式 */
.modalBtn {
  padding: 0.75rem 2rem !important;
  border-radius: 0.5rem !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  border: none !important;
  min-width: 120px !important;
  height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.cancelBtn {
  background-color: #f3f4f6 !important;
  color: #4b5563 !important;
}

.cancelBtn:hover {
  background-color: #e5e7eb !important;
  transform: translateY(-2px);
}

/* 金额样式 */
.totalAmount {
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  color: var(--primary) !important;
}

/* 客户电话样式 */
.customerPhone {
  color: #6b7280;
  margin-left: 8px;
  font-weight: normal;
}

/* 响应式调整 - 确保在小屏幕上也无滚动条 */
@media (max-width: 768px) {
  .detailServicePaymentSection {
    grid-template-columns: 1fr !important;
  }
  
  .ant-modal-content {
    max-width: 100% !important;
    max-height: 95vh !important;
  }
  
  .orderTable th,
  .orderTable td {
    padding: 1rem 0.75rem;
    font-size: 1rem;
  }
  
  /* 进一步减小移动设备上的间距 */
  .detailHeader, .detailTimeSection {
    gap: 1rem;
    padding-bottom: 0.75rem;
  }
  
  .detailServicePaymentSection {
    gap: 0.75rem;
    padding-bottom: 0.75rem;
  }
  
  .remarksBox {
    padding: 0.75rem;
  }
}
